<?php
ini_set('error_reporting', 6143);
ini_set('display_errors','2');
define('IN_LC', true);
define('MM_ID', 3);

include_once("validate.php");

	// Create query
	$q = 'SELECT pf_drivername as user_drivername FROM ' . 
					USERS_TABLE . ' u, '. USERSGROUPS_TABLE . ' g, ' . DRIVERNAME_TABLE . ' d 
				 	WHERE g.user_id = u.user_id AND g.group_id = 3 AND u.user_id = d.user_id
          ORDER BY user_drivername ASC';
			
	
	// Run query
	$res = $db->sql_query($q);
	while ($row = $db->sql_fetchrow($res))
	{
		echo $row['user_drivername'] . '<br>';
	}
  
?>